<div class="row">
    <div class="col-xs-12">

        <form action="" method="POST" class="form-search">
            <table class="table table-bordered table-hover">
                <tr>
                    <td class="col-xs-3 col-sm-1">
                        <select id="select_k" name="search_type">
                            <option value="uid"
                                {{if $search_type eq 'uid'}}selected="selected"{{/if}}
                            >用户UID</option>

                             <option value="type"
                                {{if $search_type eq 'type'}}selected="selected"{{/if}}
                            >类型</option>
                        </select>
                    </td>

                    <td class="col-xs-3 col-sm-2">
                        <input type="text" name="search_value" value="{{$search_value}}" placeholder="关键词">
                    </td>

                    <td colspan="80">
                        <input type="button" name="search" onclick="go_search('index');" value="查询" class="btn btn-purple btn-sm"/>
                    </td>
                </tr>
            </table>
            <script type="text/javascript">
                function go_search($ac){
                    $('.form-search').attr('action',$ac).submit();;
                }
            </script>
        </form>

        <div class="table-responsive">
            <table id="function-table" class="table table-bordered table-hover">
                <thead>
                <tr>
                    <th class="col-sm-1">序号</th>
                    <th class="col-sm-1">后台用户ID</th>
                     <th class="col-sm-1">账户名</th>
                    <th class="col-sm-1">类型</th>
                    <th class="col-sm-1">信息</th>
                    <th class="col-sm-1">记录时间</th>
                </tr>
                </thead>

                <tbody>
                {{foreach $rows as $row}}
                <tr>
                    <td>{{$row['id']}}</th>
                    <td>{{$row['uid']}}</td>
                    <td>{{$row['name']}}</th>
                    <td>{{$row['type']}}</td>
                    <td>{{$row['msg']}}</td>
                    <td>{{$row['add_time']|date_format:"%Y-%m-%d %H:%M:%S"}}</td>
                </tr>
                {{/foreach}}
                </tbody>
            </table>
        </div>
    </div>
</div>
<div class="row">
    <div class="col-xs-12">
        <div class="dataTables_paginate paging_bootstrap">{{$pageLink}}</div>
    </div>
</div>

<script>
    jQuery(function($) {
        $('.glyphicon.glyphicon-plus').each(function(){
            $(this).on('click', function(){
                $(this).toggleClass('glyphicon-minus');
            });
        });
    })
</script>
